package com.kitchen.entity;

import java.math.BigDecimal;

/**
 * 订单明细实体类
 */
public class OrderItem {
    private Integer itemId;
    private Integer orderId;
    private Integer dishId;
    private String dishName; // 冗余字段，方便显示
    private Integer quantity;
    private BigDecimal price;
    private String status;
    
    public OrderItem() {
        this.status = "待制作";
        this.quantity = 1;
    }
    
    public OrderItem(Integer dishId, Integer quantity, BigDecimal price) {
        this();
        this.dishId = dishId;
        this.quantity = quantity;
        this.price = price;
    }
    
    public Integer getItemId() {
        return itemId;
    }
    
    public void setItemId(Integer itemId) {
        this.itemId = itemId;
    }
    
    public Integer getOrderId() {
        return orderId;
    }
    
    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }
    
    public Integer getDishId() {
        return dishId;
    }
    
    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }
    
    public String getDishName() {
        return dishName;
    }
    
    public void setDishName(String dishName) {
        this.dishName = dishName;
    }
    
    public Integer getQuantity() {
        return quantity;
    }
    
    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }
    
    public BigDecimal getPrice() {
        return price;
    }
    
    public void setPrice(BigDecimal price) {
        this.price = price;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    @Override
    public String toString() {
        return "OrderItem{" +
                "itemId=" + itemId +
                ", dishId=" + dishId +
                ", dishName='" + dishName + '\'' +
                ", quantity=" + quantity +
                ", price=" + price +
                ", status='" + status + '\'' +
                '}';
    }
}

